//
//  Header.h
//  CNKICommunity
//
//  Created by wei on 17/1/20.
//  Copyright © 2017年 CNKI. All rights reserved.
//

#ifndef Header_h
#define Header_h



//颜色
#define TitleTagColor [UIColor colorWithRed:113/255.f green:113/255.f blue:113/255.f alpha:1]
#define XYLineColor [UIColor colorWithRed:229/255.f green:187/255.f blue:201/255.f alpha:1]


//Docment文件夹目录
#define kDocumentPath NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject
// 搜索历史存储路径
#define CNKISEARCH_SEARCH_HISTORY_CACHE_PATH [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"CNKISearchhistories.plist"]

/**
 屏幕宽度
 */
#define SCREENWIDTH [UIScreen mainScreen].bounds.size.width

/**
 屏幕高度
 */
#define SCREENHEIGHT [UIScreen mainScreen].bounds.size.height

/**
 获得视图底部的坐标y
 */
#define QTFRAMEBUTTOMY(view) (view.frame.size.height+view.frame.origin.y)

/**
 获得视图上部的坐标y
 */
#define QTFRAMETOPY(view) view.frame.origin.y

/**
 获得视图左边的坐标x
 */
#define QTFRAMELEFTX(view) view.frame.origin.x
/**
 获得视图右边的坐标x
 */
#define QTFRAMERIGHTX(view) (view.frame.size.width+view.frame.origin.x)

/**
 适配用的
 */
#define WIDTHBASE (SCREENWIDTH/320)
#define HEIGHTBASE (SCREENHEIGHT/568)
#define WID320 (SCREENHEIGHT/320)
#define HEIGHTBASETWO ((SCREENHEIGHT - 113)/(568 - 113))



#ifdef DEBUG
#define LRString [NSString stringWithFormat:@"%s", __FILE__].lastPathComponent
#define LRLog(...) printf(" %s 第%d行: %s\n\n", [LRString UTF8String] ,__LINE__, [[NSString stringWithFormat:__VA_ARGS__] UTF8String]);

#else
#define LRLog(...)
#endif



//测试
/*
 以下是接口部分
 */
#define TEST @""


//正式服
//#define TEST @""

//验证码 POST
#define  VERIFY TEST@"/auth/verify"

#endif /* Header_h */
